package io.r2mo.test.common.controller.gen.order;

import io.r2mo.test.common.domain.OrderEntity;
import io.r2mo.spring.common.webflow.PostResponse;
import io.r2mo.typed.webflow.WebResponse;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;



import io.r2mo.typed.json.JObject;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.UUID;
/**
 * <p>
 * Order 响应
 * </p>
 *
 * @author lang
 * @since 2025-09-22
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Schema(name = "订单响应")
public class OrderCommonResponse extends PostResponse implements WebResponse<OrderEntity> {
    @Schema(description = "主键")
    private UUID id;
    @Schema(description = "编码")
    private String code;
    @Schema(description = "创建者")
    private UUID createdBy;
    @Schema(description = "创建时间")
    private LocalDateTime createdAt;
    @Schema(description = "更新者")
    private UUID updatedBy;
    @Schema(description = "更新时间")
    private LocalDateTime updatedAt;
    @Schema(description = "是否启用")
    private boolean enabled;
    private String orderNo;
    private BigDecimal amountOrder;
    private BigDecimal amountDiscount;
    private BigDecimal amountPayed;
    private BigDecimal amountDelivery;
    private BigDecimal amountPackage;
    private String customerName;
    private String customerPhone;
    private String customerAddr;
    private LocalDateTime orderAt;
    private LocalDateTime payAt;
    private LocalDateTime deliveryAt;
    private String payResult;
    private String remark;
    private String reason;
    private UUID platformId;
    private UUID shopId;
    private UUID merchantId;

    @Override
    @SuppressWarnings("unchecked")
    public OrderCommonResponse data(OrderEntity data) {
        this.readFrom(data);
        return this;
    }
}
